#include "test.h"

int test1(void)
{
    cout << "this is test1" << endl;
    return 1;
}

int test2(void)
{
    // int age = 30;
    // int* pointToInt = &age;
    // cout << "integer age is at: 0x" << hex << pointToInt << endl;

    // int dogage = 30;
    // cout << "dogage = " << dogage << endl;
    // int *point = &dogage;
    // cout << "input age = " << endl;
    // cin >> *point;
    // cout << "input stored at 0x" << hex << point << endl;
    // cout << "dogage = " << dec << dogage << endl;

    // cout << "sizeof (char *) = " << sizeof(char *) << endl;

    cout << "how many integers you wish to enter";
    int numEntries = 0;
    cin >> numEntries;
    int *pointtoints = new int[numEntries];
    cout << "Allocated for " << numEntries << endl;
    for (int i = 0; i < numEntries; i++)
    {
        cout << "enter number:" << i << ":";
        cin >> *(pointtoints + i);
    }
    cout << "displaying all number entered:" << endl;
    for (int counter = 0; counter < numEntries; counter++)
    {
        cout << *(pointtoints++) << " ";
    }
    cout << endl;
    pointtoints -= numEntries;
    delete[] pointtoints;

    return 1;
}



















